﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Thongke
{
    public partial class FrmTK_hoadon_thang : DevExpress.XtraEditors.XtraForm
    {
        DAL.ThongkeDAL _dal = new DAL.ThongkeDAL();
        public FrmTK_hoadon_thang()
        {
            InitializeComponent();
        }

        private void FrmTK_hoadon_thang_Load(object sender, EventArgs e)
        {
            var thoigian = Convert.ToDateTime(dtengay.EditValue);
            DataTable _dtb;
            _dtb = _dal.select_TK_hoadon_thang(thoigian);


            if (_dtb != null)
            {
                grcMain.DataSource = _dtb;
            }
        }

        private void dtengay_EditValueChanged(object sender, EventArgs e)
        {
            var thoigian = Convert.ToDateTime(dtengay.EditValue);
            DataTable _dtb;
            _dtb = _dal.select_TK_hoadon_thang(thoigian);


            if (_dtb != null)
            {
                grcMain.DataSource = _dtb;
            }
        }
    }
}
